<template>
  <base-breadcrumb
    class="mobileDetail"
    style="padding-bottom: 20px;"
  >
    <a-form-model
      ref="form1"
      :model="form"
      :rules="rules"
    >
      <a-tabs
        ref="tabs"
        v-model="nextSteps"
        @change="callback"
      >
        <a-tab-pane
          key="1"
          tab="基本信息"
        >
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="工程承包模式"
                prop="contractModelCode"
              >
                <a-select
                  v-model="form.contractModelCode"
                  disabled
                  @select="selectChange"
                >
                  <a-select-option
                    v-for="d in selectDatas.projectContractingModel"
                    :key="d.code"
                    :value="d.code"
                  >
                    {{ d.name }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="是否内部分包"
                prop="innerPackageCode"
              >
                <a-select
                  v-model="form.innerPackageCode"
                  disabled
                  @change="isInnerPackage"
                >
                  <a-select-option :value="0">
                    否
                  </a-select-option>
                  <a-select-option :value="1">
                    是
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
            <a-col
              v-if="isContract"
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="专业承包公司"
                prop="contractBranchs"
              >
                <a-select
                  v-model="form.contractBranchs"
                  mode="multiple"
                  disabled
                >
                  <a-select-option
                    v-for="d in contractingBranchs"
                    :key="d.orgId"
                    :value="d.orgId"
                  >
                    {{ d.orgName }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>

            <a-col
              v-if="isGeneral"
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="总承包单位"
                prop="generalContractorCompanyName"
              >
                <BaseInput
                  v-model="form.generalContractorCompanyName"
                  disabled
                  placeholder="输入总承包单位"
                />
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="项目名称"
                prop="projectName"
              >
                <BaseInput
                  v-model="form.projectName"
                  disabled
                  placeholder="输入项目名称"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="项目简称"
                prop="projectOmit"
              >
                <BaseInput
                  v-model="form.projectOmit"
                  disabled
                  placeholder="输入项目简称"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item label="项目编号">
                <BaseInput
                  v-model="form.projectNum"
                  disabled
                  placeholder="项目编号"
                />
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="一级地域"
                prop="oneArea"
              >
                <a-select
                  v-model="form.oneArea"
                  disabled
                  label-in-value
                  @change="getOneArea"
                >
                  <a-select-option
                    v-for="item in areaDicts"
                    :key="item.id"
                    :value="item.id"
                  >
                    {{ item.name }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="二级地域"
                prop="secondArea"
              >
                <a-select
                  v-model="form.secondArea"
                  disabled
                  label-in-value
                  @change="getTwoArea"
                >
                  <a-select-option
                    v-for="item in areaDicts2"
                    :key="item.id"
                    :value="item.id"
                  >
                    {{ item.name }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="三级地域"
                prop="threeArea"
              >
                <a-select
                  v-model="form.threeArea"
                  disabled
                  label-in-value
                  @change="getThreeArea"
                >
                  <a-select-option
                    v-for="item in areaDicts3"
                    :key="item.id"
                    :value="item.id"
                  >
                    {{ item.name }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
              style="position: relative"
            >
              <a-form-model-item
                label="四级地域"
                prop="fourArea"
              >
                <a-select
                  v-model="form.fourArea"
                  disabled
                  label-in-value
                >
                  <a-select-option
                    v-for="item in areaDicts4"
                    :key="item.id"
                    :value="item.id"
                  >
                    {{ item.name }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="地理坐标"
                prop="longitude"
              >
                <BaseInputNumber
                  v-model="form.longitude"
                  style="margin-right: 20px;width: 90px !important;"
                  disabled
                  placeholder="经度"
                />
                <BaseInputNumber
                  v-model="form.latitude"
                  disabled
                  style="width: 90px !important;"
                  placeholder="纬度"
                />
              </a-form-model-item>
            </a-col>
            <!--<a-col :md="8" :sm="8">-->
            <!--<a-form-model-item-->
            <!--label="详细地址"-->
            <!--:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"-->
            <!--:wrapperCol="{ lg: { span: 17}, sm: { span: 17 } }" prop="projectAddress">-->
            <!--<BaseInput-->
            <!--v-model="form.projectAddress"-->
            <!--placeholder="输入详细地址 "-->
            <!--type="textarea"/>-->
            <!--</a-form-model-item>-->
            <!--</a-col>-->
          </a-row>

          <a-row :gutter="24">
            <a-col
              :md="24"
              :sm="24"
            >
              <a-form-model-item
                label="详细地址"
                prop="projectAddress"
              >
                <BaseInput
                  v-model="form.projectAddress"
                  disabled
                  placeholder="输入详细地址 "
                  type="textarea"
                />
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="区域一级管辖单位(所属办事处)"
                prop="jurisdictionOneCode"
              >
                <a-select
                  v-model="form.jurisdictionOneCode"
                  disabled
                  placeholder="区域一级管辖单位(所属办事处)"
                >
                  <a-select-option
                    v-for="item in managementLists"
                    :key="item.code"
                    :value="item.code"
                  >
                    {{ item.name }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="区域二级管辖单位(所属办事处)"
                prop="jurisdictionTwoCode"
              >
                <a-select
                  v-model="form.jurisdictionTwoCode"
                  disabled
                  placeholder="区域二级管辖单位(所属办事处)"
                >
                  <a-select-option
                    v-for="item in agenciesLists"
                    :key="item.code"
                    :value="item.code"
                  >
                    {{ item.name }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
          </a-row>

          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="承接名义"
                prop="undertakeCode"
              >
                <a-select
                  v-model="form.undertakeCode"
                  disabled
                >
                  <a-select-option
                    v-for="d in selectDatas.continuesTheNominal"
                    :key="d.code"
                    :value="d.code"
                  >
                    {{ d.name }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="实施单位(所属二级单位)"
                prop="implementationTwo"
              >
                <!--<BaseInput-->
                <!---->
                <!--v-decorator="['implementationTwo', { rules: [{ required: true, message: ' ' }] }]"-->
                <!--name="name"-->
                <!--placeholder=""-->
                <!--disabled-->
                <!--/>-->
                <BaseInput
                  v-model="twoCompany"
                  disabled
                  placeholder=""
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="实施单位(所属三级单位)"
                prop="implementationThree"
              >
                <a-select
                  v-model="form.implementationThree"
                  disabled
                  label-in-value
                  placeholder="实施单位(所属三级单位)"
                  @change="handelCompanys"
                >
                  <a-select-option
                    v-for="d in company"
                    :key="d.orgId"
                    :value="d.orgId"
                  >
                    {{ d.orgName }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="项目类型"
                prop="projectTypeCode"
              >
                <a-select
                  v-model="form.projectTypeCode"
                  disabled
                  @change="getProType"
                >
                  <a-select-option
                    v-for="item in typeNames"
                    :key="item.typeId"
                    :value="item.typeId"
                  >
                    {{ item.typeName }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="项目业态"
                prop="projectFormatCode"
              >
                <a-select
                  v-model="form.projectFormatCode"
                  disabled
                  mode="multiple"
                >
                  <a-select-option
                    v-for="d in projectForm"
                    :key="d.code"
                    :value="d.code"
                  >
                    {{ d.name }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="结构类型"
                prop="structureTypeCode"
              >
                <a-select
                  v-model="form.structureTypeCode"
                  disabled
                >
                  <a-select-option
                    v-for="d in selectDatas.structureType"
                    :key="d.code"
                    :value="d.code"
                  >
                    {{ d.name }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="项目重要程度"
                prop="projectImportanceCode"
              >
                <a-select
                  v-model="form.projectImportanceCode"
                  disabled
                  @change="getIsImpotant"
                >
                  <a-select-option
                    v-for="item in importantNames"
                    :key="item.importantId"
                    :value="item.importantId"
                  >
                    {{ item.importantName }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="是否为重点项目"
                prop="keyProjectsCode"
              >
                <a-select
                  v-model="form.keyProjectsCode"
                  disabled
                >
                  <a-select-option
                    v-for="item in isImportants"
                    :key="item.id"
                    :value="item.id"
                  >
                    {{ item.name }}
                  </a-select-option>
                </a-select>
                <!--<BaseInput disabled v-model="isImportantProject"/>-->
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="局级大客户"
                prop="bureauCustomerCode"
              >
                <a-select
                  v-model="form.bureauCustomerCode"
                  disabled
                >
                  <a-select-option
                    v-for="item in bureauCustomers"
                    :key="item.customerId"
                    :value="item.customerId"
                  >
                    {{ item.customerName }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="公司级大客户"
                prop="companyCustomerCode"
              >
                <a-select
                  v-model="form.companyCustomerCode"
                  disabled
                  @change="getLevelName"
                >
                  <a-select-option
                    v-for="item in companyCustomers"
                    :key="item.customerId"
                    :value="item.customerId"
                  >
                    {{ item.customerName }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="客户级别"
                prop=""
              >
                <BaseInput
                  v-model="levelName"
                  disabled
                  placeholder=""
                />
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="设计单位名称"
                prop="designUnitName"
              >
                <BaseInput
                  v-model="form.designUnitName"
                  disabled
                  placeholder=" 输入设计单位名称"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="建设单位名称"
                prop="constructionName"
              >
                <BaseInput
                  v-model="form.constructionName"
                  disabled
                  placeholder="输入建设单位名称 "
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="建设单位性质"
                prop="constructionNatureCode"
              >
                <a-select
                  v-model="form.constructionNatureCode"
                  disabled
                >
                  <a-select-option
                    v-for="d in selectDatas.natureOfConstructionUnit"
                    :key="d.code"
                    :value="d.code"
                  >
                    {{ d.name }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="建设单位社会统一信用代码"
                prop="constructionCode"
              >
                <BaseInput
                  v-model="form.constructionCode"
                  disabled
                  placeholder=" 建设单位社会统一信用代码"
                  style="width: 100%;"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="审计单位名称"
                prop="auditName"
              >
                <BaseInput
                  v-model="form.auditName"
                  disabled
                  placeholder=" 审计单位名称"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="监理单位名称"
                prop="supervisionName"
              >
                <BaseInput
                  v-model="form.supervisionName"
                  disabled
                  placeholder="输入监理单位名称 "
                />
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="勘察单位名称"
                prop="surveyName"
              >
                <BaseInput
                  v-model="form.surveyName"
                  disabled
                  placeholder="输入勘察单位名称"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="咨询单位名称"
                prop="consultingName"
              >
                <BaseInput
                  v-model="form.consultingName"
                  disabled
                  placeholder="输入咨询单位名称 "
                />
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="是否签订合同"
                prop="contractCode"
              >
                <a-radio-group
                  v-model="form.contractCode"
                  disabled
                >
                  <a-radio :value="1">
                    已签订
                  </a-radio>
                  <a-radio :value="0">
                    未签订
                  </a-radio>
                </a-radio-group>
              </a-form-model-item>
            </a-col>
            <a-col
              v-if="isContractMileage"
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="合同工程里程(km)"
                prop="contractMileage"
              >
                <BaseInputNumber
                  v-model="form.contractMileage"
                  disabled
                  placeholder="合同工程里程"
                  style="width: 100%"
                />
              </a-form-model-item>
            </a-col>

            <a-col
              v-if="isConstruction"
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="合同建筑面积-地上(万m2)"
                prop="contractAreaGround"
              >
                <BaseInputNumber
                  v-model="form.contractAreaGround"
                  disabled
                  placeholder="合同建筑面积-地上(万m2)"
                  style="width: 100%"
                  @change="groundArea"
                />
              </a-form-model-item>
            </a-col>

            <a-col
              v-if="isConstruction"
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="合同建筑面积-地下(万m2)"
                prop="contractAreaUnderground"
              >
                <BaseInputNumber
                  v-model="form.contractAreaUnderground"
                  disabled
                  placeholder="合同建筑面积-地下(万m2)"
                  style="width: 100%"
                  @change="ungroundArea"
                />
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row
            v-if="isConstruction"
            :gutter="24"
          >
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="地上层数"
                prop="groundFloor"
              >
                <BaseInputNumber
                  v-model="form.groundFloor"
                  disabled
                  placeholder="请输入地上层数"
                  style="width: 100%"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="地下层数"
                prop="undergroundFloor"
                style="width: 100%"
              >
                <BaseInputNumber
                  v-model="form.undergroundFloor"
                  disabled
                  placeholder="请输入地下层数"
                  style="width: 100%"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="合同建筑总面积(万m2)"
                prop=""
              >
                <BaseInputNumber
                  v-model="totalArea"
                  disabled
                  placeholder="合同建筑总面积(万m2) "
                  style="width: 100%"
                />
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="合同单体工程个数"
                prop="contractSingleProject"
              >
                <BaseInputNumber
                  v-model="form.contractSingleProject"
                  disabled
                  placeholder=" "
                  style="width: 100%"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="最高(长)单位工程米数(Km)"
                prop="engineeringMeters"
              >
                <BaseInputNumber
                  v-model="form.engineeringMeters"
                  disabled
                  name="name"
                  placeholder="最高（长）单位工程米数(Km)"
                  style="width: 100%"
                />
              </a-form-model-item>
            </a-col>
            <!--<a-col :md="8" :sm="8">-->
            <!--<a-form-model-item-->
            <!--label="维保期时间(年)"-->
            <!--:labelCol="{ lg: { span: 7 }, sm: { span: 7 } }"-->
            <!--:wrapperCol="{ lg: { span: 17 }, sm: { span: 17 } }">-->
            <!--<BaseInputNumber-->
            <!--style="width: 100%"-->
            <!--v-decorator="['maintenanceTime',  { rules: [{ required: true, message: ' ' }] }]"-->
            <!--name="name"-->
            <!--placeholder=""/>-->
            <!--</a-form-model-item>-->
            <!--</a-col>-->
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="合同开工日期"
                prop="contractStartDate"
              >
                <a-date-picker
                  v-model="form.contractStartDate"
                  disabled
                  format="YYYY-MM-DD"
                  placeholder="请选择日期"
                  @change="getContractStartDate"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="合同竣工日期"
                prop="contractEndDate"
              >
                <a-date-picker
                  v-model="form.contractEndDate"
                  disabled
                  format="YYYY-MM-DD"
                  placeholder="请选择日期"
                  @change="getContractEndDate"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="合同工期"
                prop=""
              >
                <BaseInput
                  v-model="countDate"
                  disabled
                  placeholder="合同工期"
                />
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="合同额(万)"
                prop="contractValue"
              >
                <BaseInputNumber
                  v-model="form.contractValue"
                  disabled
                  placeholder=" "
                  style="width: 100%"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="自有施工合同额"
                prop="ownerContractValue"
              >
                <BaseInputNumber
                  v-model="form.ownerContractValue"
                  disabled
                  placeholder="自有施工合同额（万）"
                  style="width: 100%"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="8"
              :sm="8"
            >
              <a-form-model-item
                label="备案项目经理"
                prop="projectManager"
              >
                <a-select
                  v-model="form.projectManager"
                  show-search
                  disabled
                  label-in-value
                  :filter-option="filterOption"
                  @change="getManagerName"
                >
                  <a-select-option
                    v-for="item in projectManagers"
                    :key="item.id"
                    :value="item.id"
                  >
                    {{ item.name }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="12"
              :sm="12"
            >
              <a-form-model-item
                label="项目特点或难点"
                prop="projectFeatures"
              >
                <BaseInput
                  v-model="form.projectFeatures"
                  type="textarea"
                  disabled
                  placeholder="项目特点或难点"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="12"
              :sm="12"
            >
              <a-form-model-item
                label="主施工范围"
                prop="mainScope"
              >
                <BaseInput
                  v-model="form.mainScope"
                  type="textarea"
                  disabled
                  placeholder="主施工范围"
                />
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="12"
              :sm="12"
            >
              <a-form-model-item
                label="计划创优级别"
                prop="excellencePlanCode"
              >
                <a-select
                  v-model="form.excellencePlanCode"
                  disabled
                >
                  <a-select-option
                    v-for="d in selectDatas.planExcellenceLevels"
                    :key="d.code"
                    :value="d.code"
                  >
                    {{ d.name }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
            <a-col
              :md="12"
              :sm="12"
            >
              <a-form-model-item
                label="计划观摩级别"
                prop="observePlanCode"
              >
                <a-select
                  v-model="form.observePlanCode"
                  disabled
                >
                  <a-select-option
                    v-for="d in selectDatas.planToObserveLevels"
                    :key="d.code"
                    :value="d.code"
                  >
                    {{ d.name }}
                  </a-select-option>
                </a-select>
              </a-form-model-item>
            </a-col>
          </a-row>
          <a-row :gutter="24">
            <a-col
              :md="12"
              :sm="12"
            >
              <a-form-model-item
                label="计划创优内容"
                prop="excellentContent"
              >
                <BaseInput
                  v-model="form.excellentContent"
                  type="textarea"
                  disabled
                  placeholder="计划创优内容"
                />
              </a-form-model-item>
            </a-col>
            <a-col
              :md="12"
              :sm="12"
            >
              <a-form-model-item
                label="计划观摩内容"
                prop="observeContent"
              >
                <BaseInput
                  v-model="form.observeContent"
                  type="textarea"
                  disabled
                  placeholder="计划观摩内容"
                />
              </a-form-model-item>
            </a-col>
          </a-row>
          <!--<a-button style="float:right;margin-top: 20px;" @click="nextStep()" type="primary">下一步</a-button>-->
        </a-tab-pane>

        <a-tab-pane
          key="2"
          tab="项目部设置"
        >
          <title-name title="项目领导班子人员配置" />
          <a-table
            :columns="columns"
            :data-source="projectPost"
            bordered
            :pagination="false"
          >
            <span
              slot="serial"
              slot-scope="text, record, index"
            >{{ index + 1 }}</span>
            <span
              slot="jobName"
              slot-scope="text, record, index"
            >
              <template>
                <span
                  v-if=" record.requiredCode == 0 "
                  class="requireRed"
                >*</span> {{ record.jobName }} ({{ record.canBothName }})
              </template>
            </span>
            <span
              slot="employeeName"
              slot-scope="record"
            >
              <template>
                {{ record.staffList.map(s=>s.staffName).join(',') }}
              </template>
            </span>
            <span
              slot="employeeNum"
              slot-scope="record"
            >
              <template>
                <span
                  v-for="(staff,index) in record.staffList"
                  :key="index"
                >
                  <span v-if="index !=0 ">,</span>
                  <sapn
                    v-if="staff.statusCode == 0 "
                    style="color:rgba(0, 0, 0, 0.65)"
                  >{{ staff.staffCode }}</sapn>
                  <sapn
                    v-else-if="staff.statusCode != 0 "
                    style="color:red;"
                  >{{ staff.staffCode }}</sapn>
                </span>
              </template>
            </span>
            <span
              slot="status"
              slot-scope="record"
            >
              <template>
                {{ record.staffList.map(s=>s.statusName).join(',') }}
              </template>
            </span>
            <span
              slot="operation"
              slot-scope="text, record"
            >
              <template>
                <a @click="handleEdit(record)">编辑</a>
              </template>
            </span>
          </a-table>

          <title-name
            title="其他岗位人员配置"
            style="margin-top: 20px;"
          />
          <a-table
            :columns="columns"
            :data-source="otherPost"
            bordered
            :pagination="false"
          >
            <span
              slot="serial"
              slot-scope="text, record, index"
            >{{ index + 1 }}</span>
            <span
              slot="jobName"
              slot-scope="text, record, index"
            >
              <template>
                <span
                  v-if=" record.requiredCode == 0 "
                  class="requireRed"
                >*</span> {{ record.jobName }} ({{ record.canBothName }})
              </template>
            </span>
            <span
              slot="employeeName"
              slot-scope="record"
            >
              <template>
                {{ record.staffList.map(s=>s.staffName).join(',') }}
              </template>
            </span>
            <span
              slot="employeeNum"
              slot-scope="record"
            >
              <template>
                <span
                  v-for="(staff,index) in record.staffList"
                  :key="staff"
                >
                  <span v-if="index !=0 ">,</span>
                  <sapn
                    v-if="staff.statusCode == 0 "
                    style="color:rgba(0, 0, 0, 0.65)"
                  >{{ staff.staffCode }}</sapn>
                  <sapn
                    v-else-if="staff.statusCode != 0 "
                    style="color:red;"
                  >{{ staff.staffCode }}</sapn>
                </span>
              </template>
            </span>
            <span
              slot="status"
              slot-scope="record"
            >
              <template>
                {{ record.staffList.map(s=>s.statusName).join(',') }}
              </template>
            </span>
            <span
              slot="operation"
              slot-scope="text, record"
            >
              <template>
                <a @click="handleEdit(record)">编辑</a>
              </template>
            </span>
          </a-table>
          <!--<a-button style="float:right;margin-top: 20px;" @click="nextStep()" type="primary">下一步</a-button>-->
        </a-tab-pane>

        <a-tab-pane
          key="3"
          tab="附件上传"
        >
          <title-name title="附件上传" />
          <u-table
            :list-url="listUrl"
            :upload-list="uploadList"
            :delete-url="deleteUrl"
            :business-id="businessId"
            :is-show="isShow"
            business-code="PM01"
          />
        </a-tab-pane>
      </a-tabs>

      <add-ad-just
        ref="createModal"
        :visible="visible"
        :loading="confirmLoading"
        :model="mdl"
        @employeeNums="employeeNums"
        @cancel="handleCancel"
        @ok="handleOk"
      />

      <!--<div style="float:right;margin-top: 20px;margin-bottom: 20px;">-->
      <!--<a-button type="primary" style="margin-right: 20px" @click="saveDraft">保存草稿</a-button>-->
      <!--<a-button type="primary" style="margin-right: 20px" @click="submit">提交</a-button>-->
      <!--<a-button type="primary" @click="goBack">关闭</a-button>-->
      <!--</div>-->
    </a-form-model>
  </base-breadcrumb>
</template>

<script>
import FooterToolBar from '@/components/FooterToolbar'
import AddAdJust from './addAdjust'
import {
  getDataDicts,
  addProjectsInfo,
  getCustomerDicts,
  getAreadicts,
  getProjectManager,
  getProjectNum,
  getImCompany,
  getProjectsDel,
  getProjectFrom,
  getDepartConfig,
  addDepartmentConfig,
  getRegions
} from '@/api/project/projects'
import { getProjectypesList, getProjectypesOne } from '@/api/project/projectypes'
import { getImportantsList, getImportantsOne } from '@/api/project/importants'
import { getCustomerList, getCustomersOne } from '@/api/project/customers'
import { getTreeTypes, getMajorBranch } from '@/api/index'
import { getOrgUsers } from '@/api/commons'
import { themeChoose } from '../../../../mixin/mixin'

const columns = [
  {
    title: '序号',
    width: 65,
    scopedSlots: { customRender: 'serial' }
  },
  {
    title: '岗位名称',
    dataIndex: 'jobName',
    width: '30%',
    scopedSlots: { customRender: 'jobName' }
  },
  {
    title: '岗位人员姓名',
    width: '25%',
    scopedSlots: { customRender: 'employeeName' }
  },
  {
    title: '员工编号',
    width: '25%',
    scopedSlots: { customRender: 'employeeNum' }
  }
  // {
  //   title: '操作',
  //   dataIndex: 'operation',
  //   scopedSlots: { customRender: 'operation' }
  // }
]

const columnAssment = [
  {
    title: '序号',
    width: 65,
    dataIndex: 'serial',

    scopedSlots: { customRender: 'serial' }
  },
  {
    title: '附件名称',
    dataIndex: 'fileName',
    width: '15%'
  },
  {
    title: '附件格式',
    dataIndex: 'suffixName',
    width: '15%'
  },
  {
    title: '附件地址',
    dataIndex: 'rootPath',
    width: '40%'
  }
  // {
  //   title: '操作',
  //   key: 'action',
  //   width: '20%',
  //   scopedSlots: { customRender: 'action' },
  // },
]

export default {
  name: 'a' + new Date().getTime(),
  mixins: [themeChoose],
  components: {
    FooterToolBar,
    AddAdJust
  },
  props: {
    text: String
  },

  data() {
    return {
      columns,
      columnAssment,
      onlyCompany: 0, // 只请求分公司
      form: {
        keyProjectsCode: '', // 是否为重点项目
        oneArea: {},
        secondArea: {},
        threeArea: {},
        fourArea: {}
      },
      rules: {
        contractModelCode: [{ required: true, message: '请选择工程承包模式', trigger: 'blur' }],
        innerPackageCode: [{ required: true, message: '请选择是否内部分包', trigger: 'blur' }],
        contractBranchs: [{ required: true, message: '请选择专业承包公司', trigger: 'blur' }],
        generalContractorCompanyName: [{ required: true, message: '请输入总承包单位', trigger: 'blur' }],
        projectName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
        projectOmit: [{ required: true, message: '请输入项目简称', trigger: 'blur' }],
        projectNum: [{ required: true, message: '请输入项目编号', trigger: 'blur' }],
        oneArea: [{ required: true, message: '请输入一级地域', trigger: 'blur' }],
        secondArea: [{ required: true, message: '请输入二级地域', trigger: 'blur' }],
        threeArea: [{ required: true, message: '请输入三级地域', trigger: 'blur' }],
        fourArea: [{ required: true, message: '请输入四级地域', trigger: 'blur' }],
        longitude: [{ required: true, message: '请输入经度', trigger: 'blur' }],
        latitude: [{ required: true, message: '请输入纬度', trigger: 'blur' }],
        projectAddress: [{ required: true, message: '请输入详细地址', trigger: 'blur' }],
        jurisdictionOneCode: [{ required: true, message: '请选择区域一级管辖单位', trigger: 'blur' }],
        jurisdictionTwoCode: [{ required: true, message: '请选择区域二级管辖单位', trigger: 'blur' }],
        undertakeCode: [{ required: true, message: '请选择承接名义', trigger: 'blur' }],
        implementationThree: [{ required: true, message: '请选择实施单位三级', trigger: 'blur' }],
        projectTypeCode: [{ required: true, message: '请选择项目类型', trigger: 'blur' }],
        projectFormatCode: [{ required: true, message: '请选择项目业态', trigger: 'blur' }],
        structureTypeCode: [{ required: true, message: '请选择结构类型', trigger: 'blur' }],
        projectImportanceCode: [{ required: true, message: '请选择项目重要程度', trigger: 'blur' }],
        keyProjectsCode: [{ required: true, message: '请选择是否为重点项目', trigger: 'blur' }],
        contractStartDate: [{ required: true, message: '请选择合同开工日期', trigger: 'change' }],
        contractEndDate: [{ required: true, message: '请选择合同竣工日期', trigger: 'change' }],
        bureauCustomerCode: [{ required: true, message: '请选择局级大客户', trigger: 'blur' }],
        companyCustomerCode: [{ required: true, message: '请选择公司大客户', trigger: 'blur' }],
        designUnitName: [{ required: true, message: '请输入设计单位名称', trigger: 'blur' }],
        constructionName: [{ required: true, message: '请输入建设单位名称', trigger: 'blur' }],
        constructionNatureCode: [{ required: true, message: '请选择建设单位性质', trigger: 'blur' }],
        constructionCode: [{ required: true, message: '请输入建设单位社会统一信用代码', trigger: 'blur' }],
        contractCode: [{ required: true, message: '请选择是否签订合同', trigger: 'change' }],
        contractMileage: [{ required: true, message: '请输入合同工程里程', trigger: 'blur' }],
        contractAreaGround: [{ required: true, message: '请输入合同建筑面积-地上(万m2)', trigger: 'blur' }],
        contractAreaUnderground: [{ required: true, message: '请输入合同建筑面积-地下(万m2)', trigger: 'blur' }],
        groundFloor: [{ required: true, message: '请输入地上层数', trigger: 'blur' }],
        undergroundFloor: [{ required: true, message: '请输入地下层数', trigger: 'blur' }],
        contractSingleProject: [{ required: true, message: '请输入合同单体工程个数', trigger: 'blur' }],
        engineeringMeters: [{ required: true, message: '请输入最高(长)单位工程米数(Km)', trigger: 'blur' }],
        contractValue: [{ required: true, message: '请输入合同额(万)', trigger: 'blur' }],
        ownerContractValue: [{ required: true, message: '请输入自有施工合同额(万)', trigger: 'blur' }],
        projectManagerCode: [{ required: true, message: '请选择备案项目经理', trigger: 'blur' }],
        projectFeatures: [{ required: true, message: '请输入项目特点或难点', trigger: 'blur' }],
        mainScope: [{ required: true, message: '请输入主施工范围', trigger: 'blur' }],
        excellencePlanCode: [{ required: true, message: '请选择计划创优级别', trigger: 'blur' }],
        observePlanCode: [{ required: true, message: '请选择计划观摩级别', trigger: 'blur' }],
        excellentContent: [{ required: true, message: '请输入计划创优内容', trigger: 'blur' }],
        observeContent: [{ required: true, message: '请输入计划观摩内容', trigger: 'blur' }]
      },

      // 附件上传
      listUrl: '/cscec-project-business/file/business/project-fileQuery',
      deleteUrl: '/cscec-project-business/file/business/project-fileDelete',
      uploadList: '/cscec-project-business/file/business/fileUpload',
      businessId: '598353091460468736',
      isShow: false,

      ungroundAreas: 0,
      totalArea: 0, // 合同建筑总面积
      groundAreas: 0, // 地上面积

      dataAssement: [],

      visible: false, // 人员配置调整
      confirmLoading: false,
      mdl: null, // 数据
      projectModecode: '', // 工程承包模式code
      projectModeId: '', // 工程承包模式
      isContract: false, // 专业承包分公司
      isGeneral: false, // 总承包公司

      editable: false,

      nextSteps: '1',

      selectDatas: {}, // 立项返回下拉数据

      editingKey: '',
      selectedRowKeys: [],
      value: 1, // 是否签订合同

      previewImage: '',

      // data:[{postName:'项目经理', employeeName:'张三',employeeNum:'231231'}],

      headers: {
        authorization: 'authorization-text'
      },
      queryParam: {
        projectName: '',
        name: ''
      },
      areaDicts: [],
      areaDicts1: [],
      areaDicts2: [],
      areaDicts3: [],
      areaDicts4: [],
      areaCode: '',
      typeNames: [],
      importantNames: [],
      isImportants: [
        { id: 0, name: '否' },
        { id: 1, name: '是' }
      ],
      customerName: [],
      projectManagers: [],
      bureauCustomers: [],
      companyCustomers: [],
      levelCode: '',
      managers: [],
      isContractMileage: false, // 线性基础数据
      isConstruction: true, // 房建
      managementLists: [], // 一级管辖单位
      agenciesLists: [], // 二级管辖单位
      threeCompany: [], // 实施单位三级
      projectForm: [], // 项目业态
      projectId: '', // 保存项目立项返回id
      oneAreaCodeName: '', // 一级区域名称
      secondAreaCodeName: '', // 二级区域名称
      threeAreaCodeName: '', // 三级区域名称
      fourAreaCodeName: '', // 四级区域名称
      projectManagerCodeName: '', // 备案项目经理名称
      twoCompany: '西南公司', // 实施单位二级
      levelName: '', // 客户级别
      startDate: '', //  开始时间
      endDate: '', //    结束时间

      countDate: 0, // 合同总工期,
      employeeNum: '', // 项目部设置人员调整员工编号

      projectPost: [], // 项目人员岗位设置
      otherPost: [], //  其他人员岗位设置

      contractingBranchs: [], // 专业承包分公司

      ispackage: '', // 是否外包

      objs: {
        businessId: '',
        code: '',
        commonFileId: ''
      },
      queryData: {
        orgId: '',
        pageNumber: '1',
        pageSize: '100'
      }
    }
  },

  created() {
    setTimeout(() => {
      this.getAreadicts()
    }, 10)
    this.getProjectypesList()
    this.getImportantsList()
    this.getCustomerList()
    this.getDataDicts()
    this.getProjectManager()
    this.getCustomer()
    this.getCompanyDicts()
    this.getProjectFrom()
    this.getMajorBranch()

    this.projectId = this.$route.query.projectId
    const token = this.$route.query.token

    let getProjectId = this.projectId
    if (getProjectId != null) {
      setTimeout(() => {
        this.getProjectDels(getProjectId)
      }, 20)
    }
  },
  computed: {
    hasSelected() {
      return this.selectedRowKeys.length > 0
    }
  },
  methods: {
    filterOption(input, option) {
      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
    },
    goBack() {
      this.$router.push({ path: '/project/lists' })
    },
    getMajorBranch() {
      getMajorBranch({ tagCodes: ['PC'] }).then((res) => {
        this.contractingBranchs = res.data
      })
    },
    // saveDraft(){  // 保存草稿
    //   if(this.nextSteps == '1'){
    //     addProjectsInfo(this.form).then(res => {
    //       if(res.code == 200){
    //         this.projectId = res.data.projectId
    //         localStorage.setItem("projectId",res.data.projectId)
    //         this.$message.success("保存草稿成功！")
    //       }else{
    //         this.$message.error("保存草稿失败！")
    //       }
    //     })
    //   }else if(this.nextSteps == '2'){
    //
    //   }else{
    //
    //   }
    // },
    // submit(){   // 提交
    //   if(this.nextSteps == '1'){
    //     this.saveInfo()
    //   }else if(this.nextSteps == '2'){
    //
    //   }else{
    //
    //   }
    // },
    groundArea(value) {
      this.groundAreas = value
      if (this.ungroundAreas != 0) {
        this.totalArea = this.ungroundAreas + value
      }
    },
    ungroundArea(value) {
      this.ungroundAreas = value
      this.totalArea = this.groundAreas + value
    },
    employeeNums(val) {
      this.employeeNum = val
    },
    handleEdit(record) {
      let _this = this
      _this.visible = true
      _this.mdl = { ...record }
    },

    // 根据id获取项目详情信息
    getProjectDels(getProjectId) {
      getProjectsDel({ projectId: getProjectId }).then((res) => {
        this.form = res.data

        // contractBranch  isContract   generalContractorCompanyName isGeneral

        if (this.form.contractModelCode == 'zycb' && this.form.innerPackageCode == 0) {
          this.isGeneral = true // 总承包
          this.isContract = false // 专业承包
        }
        if (this.form.contractModelCode == 'zycb' && this.form.innerPackageCode == 1) {
          this.isGeneral = false // 总承包
          this.isContract = true // 专业承包
        }
        if (this.form.contractModelCode != 'zycb' && this.form.innerPackageCode == 1) {
          this.isGeneral = false // 总承包
          this.isContract = true // 专业承包
        }
        if (this.form.contractModelCode != 'zycb' && this.form.innerPackageCode == 0) {
          this.isGeneral = false // 总承包
          this.isContract = false // 专业承包
        }

        // calculateTypeCode   // 项目类型计算方式

        if (this.form.calculateTypeCode == '0') {
          this.isContractMileage = false
          this.isConstruction = true
        } else {
          this.isContractMileage = true
          this.isConstruction = false
        }

        this.form.projectManager = {
          key: this.form.projectManagerCode,
          label: this.form.projectManagerName
        }

        this.form.implementationThree = {
          key: this.form.implementationThreeCode,
          label: this.form.implementationThreeName
        }

        this.levelName = res.data.customerLevelName
        this.countDate = res.data.contractDays

        this.getRegions(this.form.secondAreaCode)

        getTreeTypes({ query: { type: 1, parentId: null }, pageSize: 100 }).then((res) => {
          this.areaDicts = res.data
          const area = {
            key: this.form.oneAreaCode,
            label: this.form.oneAreaName
          }
          this.form.oneArea = area
        })

        getTreeTypes({ query: { type: 1, parentId: this.form.oneAreaCode }, pageSize: 100 }).then((res) => {
          this.areaDicts2 = res.data
          const area = {
            key: this.form.secondAreaCode,
            label: this.form.secondAreaName
          }
          this.form.secondArea = area
        })
        getTreeTypes({ query: { type: 1, parentId: this.form.secondAreaCode }, pageSize: 100 }).then((res) => {
          this.areaDicts3 = res.data
          const area = {
            key: this.form.threeAreaCode,
            label: this.form.threeAreaName
          }
          this.form.threeArea = area
        })
        getTreeTypes({ query: { type: 1, parentId: this.form.threeAreaCode }, pageSize: 100 }).then((res) => {
          this.areaDicts4 = res.data
          const area = {
            key: this.form.fourAreaCode,
            label: this.form.fourAreaName
          }
          this.form.fourArea = area
        })

        this.selectChange(this.form.contractModelCode)
        this.isInnerPackage(this.form.innerPackageCode)
      })
    },
    getDepartConfig() {
      // 项目岗位设置
      let proId = localStorage.getItem('projectId')
      getDepartConfig({ projectId: proId, projectJobType: 1 }).then((res) => {
        this.projectPost = res.data.postConfigList
      })
    },
    getDepartConfigs() {
      // 其他岗位设置
      let proId = localStorage.getItem('projectId')
      getDepartConfig({ projectId: proId, projectJobType: 0 }).then((res) => {
        this.otherPost = res.data.postConfigList
      })
    },
    getContractStartDate(value) {
      var d1 = new Date(value)
      var year = d1.getFullYear() //年
      var month = d1.getMonth() + 1 //月
      var day = d1.getDate() //日

      if (month < 10) {
        month = '0' + month
      }
      if (day < 10) {
        day = '0' + day
      }

      this.startDate = year + '-' + month + '-' + day
      this.form.contractStartDate = year + '-' + month + '-' + day

      if (this.endDate != '' && this.endDate != undefined) {
        let startTime = new Date(this.startDate)
        let endTime = new Date(this.endDate)

        if (startTime > endTime) {
          this.$message.error('开工日期不能大于竣工日期！')
          this.form.contractStartDate = undefined
          return
        } else {
          let iDays = parseInt(Math.abs(endTime.getTime() - startTime.getTime()) / 1000 / 60 / 60 / 24)
          this.countDate = iDays
        }
      }
    },
    getContractEndDate(value) {
      var d1 = new Date(value)
      var year = d1.getFullYear() //年
      var month = d1.getMonth() + 1 //月
      var day = d1.getDate() //日

      if (month < 10) {
        month = '0' + month
      }
      if (day < 10) {
        day = '0' + day
      }

      this.endDate = year + '-' + month + '-' + day
      this.form.contractEndDate = year + '-' + month + '-' + day

      if (this.startDate != '' && this.startDate != undefined) {
        var startTime = new Date(this.startDate)
        var endTime = new Date(this.endDate)

        if (endTime < startTime) {
          this.$message.error('竣工日期不能小于开工日期！')
          this.form.contractEndDate = undefined
          return
        } else {
          let iDays = parseInt(Math.abs(endTime.getTime() - startTime.getTime()) / 1000 / 60 / 60 / 24)
          this.countDate = iDays
        }
      }
    },
    handleCancel() {
      let _this = this
      _this.visible = false
      const form = _this.$refs.createModal.form
      form.resetFields() // 清理表单数据
    },
    handleOk() {
      const form = this.$refs.createModal.form
      this.confirmLoading = true
      form.validateFields((errors, values) => {
        if (!errors) {
          values.projectId = this.mdl.projectId
          values.projectJobId = this.mdl.jobId
          values.employeeNum = this.employeeNum
          values.type = 'ADD'
          addDepartmentConfig(values).then((res) => {
            this.visible = false
            this.confirmLoading = false
            this.$message.info('设置成功')
            this.getDepartConfig()
            this.getDepartConfigs()
          })
        } else {
          this.confirmLoading = false
        }
      })
    },

    edit(key) {
      const newData = [...this.data]
      const target = newData.filter((item) => key === item.key)[0]
      this.editingKey = key
      if (target) {
        target.editable = true
        this.data = newData
      }
    },

    getProType(value) {
      getProjectypesOne(value).then((res) => {
        if (res.data.calculateTypeCode == '0') {
          this.isContractMileage = false
          this.isConstruction = true
        } else {
          this.isContractMileage = true
          this.isConstruction = false
        }
      })
    },
    getCustomer() {
      getCustomerDicts({ customerHierarchyCode: 1 }).then((res) => {
        this.bureauCustomers = res.data
      })
    },
    getCompanyDicts() {
      getCustomerDicts({ customerHierarchyCode: 2 }).then((res) => {
        this.companyCustomers = res.data
      })
    },

    getLevelName(value) {
      let _this = this
      getCustomersOne(value).then((res) => {
        _this.levelName = res.data.customerLevel
        _this.form.customerLevelCode = res.data.customerLevelCode // 传给客户级别的后台数据
      })
    },
    handelCompanys(val) {
      this.companyParams.key = val.key
    },
    getProjectManager() {
      getOrgUsers(this.queryData).then((res) => {
        console.log('返回人员数据：', res.data)
        this.projectManagers = res.data
      })
    },
    getProjectypesList() {
      getProjectypesList({ typeStatusCode: 1 }).then((res) => {
        this.typeNames = res.data
      })
    },
    getImportantsList() {
      getImportantsList({ importantStatusCode: 1 }).then((res) => {
        this.importantNames = res.data
      })
    },
    getIsImpotant(value) {
      getImportantsOne(value).then((res) => {
        this.form.keyProjectsCode = res.data.importantProjectCode
        this.form.keyProjects = res.data.importantProjectCode
      })
    },

    getCustomerList() {
      getCustomerList().then((res) => {
        this.customerName = res.data
      })
    },
    getDataDicts() {
      // 数据字典返回数据
      getDataDicts().then((res) => {
        this.selectDatas = res.data
      })
    },
    getAreaList(parentId) {
      return getTreeTypes({ query: { type: 1, parentId }, pageSize: 100 })
    },
    getAreadicts() {
      this.getAreaList(null).then((res) => {
        this.areaDicts = res.data
      })
    },
    // 选择一级区域查询二级区域
    getOneArea(value) {
      if (!value) {
        return
      }
      this.getAreaList(value.key).then((res) => {
        this.areaCode = value.key
        this.oneAreaCodeName = value.label
        this.areaDicts2 = res.data
      })
    },
    // 选择二级区域查询三级区域
    getTwoArea(value) {
      if (!value) {
        return
      }
      this.getAreaList(value.key).then((res) => {
        this.areaCode = value.key
        this.secondAreaCodeName = value.label
        this.areaDicts3 = res.data
      })
      this.managementLists = []
      this.agenciesLists = []
      getRegions(value.key).then((res) => {
        this.managementLists = res.data.managementList
        this.agenciesLists = res.data.agenciesList
      })
    },
    getRegions(value) {
      // 根据二级区域查询办事处
      getRegions(value).then((res) => {
        this.managementLists = res.data.managementList
        this.agenciesLists = res.data.agenciesList
      })
    },
    // 选择三级区域查询四级区域
    getThreeArea(value) {
      if (!value) {
        return
      }
      this.getAreaList(value.key).then((res) => {
        this.threeAreaCodeName = value.label
        this.areaDicts4 = res.data
      })
    },

    getManagerName(value) {
      this.projectManagerCodeName = value.label
    },

    getProjectFrom() {
      getProjectFrom().then((res) => {
        this.projectForm = res.data
      })
    },
    selectChange(value) {
      this.projectModeCode = value
      if (value != 'zycb' && this.ispackage == 0) {
        this.isGeneral = false // 总承包
        this.isContract = false // 专业承包
      }
      if (value == 'zycb' && this.ispackage == 0) {
        this.isGeneral = true // 总承包
        this.isContract = false // 专业承包
      }
    },
    isInnerPackage(value) {
      // 是否外包

      this.ispackage = value
      if (this.projectModeCode == 'zycb' && value == 0) {
        this.isGeneral = true // 总承包
        this.isContract = false // 专业承包
      }
      if (this.projectModeCode == 'zycb' && value == 1) {
        this.isGeneral = false // 总承包
        this.isContract = true // 专业承包
      }
      if (this.projectModeCode != 'zycb' && value == 1) {
        this.isGeneral = false // 总承包
        this.isContract = true // 专业承包
      }
      if (this.projectModeCode != 'zycb' && value == 0) {
        this.isGeneral = false // 总承包
        this.isContract = false // 专业承包
      }
    },

    callback(key) {
      // tabs切换
      this.nextSteps = key
      // if(this.nextSteps == '2'){
      //   this.$refs.form1.validate((err,values) => {
      //     if (err) {
      //       if(this.projectId != ""){
      //         this.form.projectId = this.projectId
      //         addProjectsInfo(this.form).then(res => {
      //           if(res.code == 200){
      //             this.$message.success("保存成功！")
      //             this.nextSteps = '2'
      //             this.getDepartConfig()
      //             this.getDepartConfigs()
      //           }
      //         })
      //       }
      //     }else{
      //       this.nextSteps = '1'
      //     }
      //   })
      // }
    }
    // nextStep() {
    //   // 下一步第一次遍历数据
    //   let steps = this.nextSteps
    //   if (steps == '1') {
    //     this.saveInfo()
    //   }
    //   if (steps == '2') {
    //     this.nextSteps = '3'
    //   }
    //   this.callback(this.nextSteps)
    // },

    // saveInfo(){   // 保存立项基本信息
    //   this.$refs.form1.validate(() => {
    //     this.form.implementationTwo =  {key:1,label:'西南公司'}
    //     this.form.contractDays = this.countDate
    //     if(this.projectId != ""){
    //       this.form.projectId = this.projectId
    //     }
    //     this.form.isSubmit = true
    //     addProjectsInfo(this.form).then(res => {
    //       if(res.code === 200){
    //         this.projectId = res.data.projectId
    //         localStorage.setItem("projectId",res.data.projectId)
    //         this.$message.success("保存成功！")
    //         this.nextSteps = '2'
    //         this.getDepartConfig()
    //         this.getDepartConfigs()
    //       }else{
    //         this.$message.error("保存失败！")
    //       }
    //
    //     })
    //   })
    // },
  }
}
</script>

<style lang="less" scoped>
.requireRed {
  color: red;
}
/deep/ .ant-form-item label {
  font-size: 12px;
}
</style>

